<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>

<style>

body{color:white ;
background-color:black;
font-size:19px;

}
/**/
img{
max-width:80%;
height:auto;
}

td#td0{
border-bottom:white 1px solid;
}

table{
border-collapse:collapse;
}  
  
</style>
<script>
document.write("<s"+"cript type='text/javascript' src='../Documents/data.js?"+Math.random()+"'></scr"+"ipt>");
</script>
<script type="text/javascript" src="browservariable.js">
</script>


<!-- 弹出page begin -->
<style>
* {margin:0;}
body {font-size:9pt;}
#container div{margin-top:6px;}
#select_city h3{float:left;}
#main_city,#all_province {clear:both;}
#main_city div,#all_province div{width:588px;clear:left;}
#main_city h4,#all_province h4{float:left;display:inline;font-size:16px;}
#main_city div span,#all_province div span{margin:0 9px;cursor:pointer;font-size:14px;}
#float_lay{width:220px;height:122px;border:1px #787878 solid;position:absolute;background:#fff;z-index:999;display:none;}
</style>
<script type="text/javascript">

function setPopupDiv(){
var popupDiv = document.getElementById("popupDiv");
popupDiv.style.position = "absolute";
popupDiv.style.border = "1px solid #ccc";
popupDiv.style.background = "#000";
popupDiv.style.zIndex = 99;


var arrayPageSize   = getPageSize();
var bodyBack = document.createElement("div");
bodyBack.setAttribute("id","bodybg")
bodyBack.style.position = "absolute";
bodyBack.style.width = "320px";
bodyBack.style.height = "367px";
bodyBack.style.zIndex = 98;
bodyBack.style.top = 0;
bodyBack.style.left = 0;
bodyBack.style.filter = "alpha(opacity=50)";
bodyBack.style.opacity = 0.5;
bodyBack.style.background = "#ddf";

var mybody = document.getElementById("test");
insertAfter(popupDiv,mybody);
insertAfter(bodyBack,mybody);

}

function openLayer(objId,conId){

//var arrayPageScroll = getPageScroll();
if (!document.getElementById("popupAddr")){

setPopupDiv();

}

document.getElementById("bodybg").style.display = "";

var popObj=document.getElementById("popupDiv")
//popObj.innerHTML = document.getElementById(conId).innerHTML;
//document.getElementById(conId).innerHTML='';
//alert(popObj.innerHTML);


popObj.style.display = "";

popObj.style.top  = 100;
popObj.style.left = 50;
//popObj.style.width =300;
//popObj.style.height =300;
}


function insertAfter(newElement,targetElement){
var parent = targetElement.parentNode;
if(parent.lastChild == targetElement){
parent.appendChild(newElement);
}
else{
parent.insertBefore(newElement,targetElement.nextSibling);
}
}



function getPageSize(){
var xScroll,yScroll;
if (window.innerHeight  &&  window.scrollMaxY){
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
sScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else {
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth,windowHeight;
if (self.innerHeight) {
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement  &&  document.documentElement.clientHeight) {
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) {
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
var pageWidth,pageHeight
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth) {
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}

function closeLayer(){
document.getElementById("popupDiv").style.display = "none";
document.getElementById("bodybg").style.display = "none";
return false;
}
</script>

<!-- 弹出page end-->
 

<script language="javascript"> 
</script> 





<table id="abc" width = "100%"   border="0" style="table-layout:fixed; word-break:break-all; font-size:13px;" >
</table>




<script language="javascript">

//alert(variable);
variable="";
    menustree = "menustree";
	 
	navigation = "YES";

	   menutagname = "login";

	 
  mainmenulist = getVariable(menustree);
if(mainmenulist == null){
 	xmlhttp = new XMLHttpRequest();
	xmlhttp.open("GET","menus.xml",false);
	xmlhttp.send();
	mainmenulist_all = xmlhttp.responseText;
	mainmenulist=mainmenulist_all;
	setVariable(menustree,mainmenulist);	
	mainmenulist = getVariable(menustree); 
 
}
/////////////////////////////////

  form = document.createElement("form");	
  form.innerHTML = mainmenulist;


  currentmenuelement = form.getElementsByTagName(menutagname)[0];
  //alert(currentmenuelement.attributes["title"].value);
  document.write("<card title='"+currentmenuelement.attributes["title"].value+"'/>");
  
  ES = currentmenuelement.getElementsByTagName("row");

var storyinimgedingzhistr='';
function storyinimgesdingzhi(){

	
	var tableinner='';
	
	for (var i=0;i<ES.length;i++)
	{
		var flag = ES[i].attributes["check"].value;
		var src = ES[i].attributes["src"].value;
		var text = ES[i].attributes["text"].value;	
		var href = ES[i].attributes["href"].value;	
		var method = ES[i].attributes["method"].value;
		if( i%4 == 0){
		  storyinimgedingzhistr += "</tr><tr>";
		}
		  storyinimgedingzhistr += "<th href='";
		  storyinimgedingzhistr += href;
		  storyinimgedingzhistr += "' onClick='handlerdingzhi(this, ";
		  storyinimgedingzhistr += i;
		  storyinimgedingzhistr += ")'>";
		  storyinimgedingzhistr += "<img name='select'   src='select_32.png' check='";
		  storyinimgedingzhistr += flag;
		  storyinimgedingzhistr += "'/>";
		  storyinimgedingzhistr += "<img src='";
		  storyinimgedingzhistr += src;
		  storyinimgedingzhistr += "'/><br/>";
		  storyinimgedingzhistr += text;
		  storyinimgedingzhistr += "</th>";
	}

}	
function showinimagedingzhi(){
	var t = document.getElementById("abc");
	document.getElementById("abc").innerHTML = storyinimgedingzhistr;
	ths = document.getElementById("abc").getElementsByTagName("th");


	for(i=0;i<ths.length;i++){
	    imgs = ths[i].getElementsByTagName("img"); 
        imgs[0].style.position="absolute";
		if(imgs[0].attributes["check"].value=='Y'){
		   imgs[0].src="select_32.png";
		   
		}else{
		   imgs[0].src="disable_32.png";
		}
	}

}	

	


function handlerdingzhi(e ,index){

	    imgs = e.getElementsByTagName("img"); 
		
		if(imgs[0].attributes["check"].value=='Y'){
		   imgs[0].attributes["check"].value = 'N';
		}else{
		   imgs[0].attributes["check"].value = 'Y';
		}

		
		if(imgs[0].attributes["check"].value=='Y'){
		   imgs[0].src="select_32.png";
		}else{
		   imgs[0].src="disable_32.png";
		}
		
		ES[index].attributes["check"].value = imgs[0].attributes["check"].value;


	setVariable(menustree,form.innerHTML);
	mainmenulist = getVariable(menustree);

	storyinimagestr='';
	storyinimage();
	storyinliststr=''
	storyinlist();
	storyinimgedingzhistr='';
	storyinimgesdingzhi();
}


//////////image

var storyinimagestr='';
function storyinimage(){
    
		
	for (var i=0,j=0;i<ES.length;i++)
	{


		if(ES[i].attributes["check"].value == "Y"){

		
		  var src = ES[i].attributes["src"].value;
		  var text = ES[i].attributes["text"].value;	
		  var href = ES[i].attributes["href"].value;	
		  var method = ES[i].attributes["method"].value;
		


		
		
		  if( j%4 == 0){
	    	  storyinimagestr += "</tr><tr>";
	     	}
		  j++;
		  storyinimagestr += "<th href='";
		  storyinimagestr += href;
		  storyinimagestr += "' method='";
		  storyinimagestr += method;
		  
		if(ES[i].attributes["childmenutagname"]){
			storyinimagestr += "' childmenutagname='";
		    storyinimagestr += ES[i].attributes["childmenutagname"].value;
		}
		  
		  
		  storyinimagestr += "' onClick='loadhrefforlist(this)'>";
		  storyinimagestr += ES[i].outerHTML;
		  storyinimagestr += "<img src='";
		  storyinimagestr += src;
		  storyinimagestr += "'/><br/>";
		  storyinimagestr += text;
		  storyinimagestr += "</th>";
		}
	}
	
	

}

function showinimage(){
	var t = document.getElementById("abc");
	document.getElementById("abc").innerHTML = storyinimagestr;

}	




//////////list

var storyinliststr='';
function storyinlist(){
	for (var i=0;i<ES.length;i++)
	{
		if(ES[i].attributes["check"].value == "Y"){
		
		var src = ES[i].attributes["src"].value;
		var text = ES[i].attributes["text"].value;	
		var href = ES[i].attributes["href"].value;	
		var method = ES[i].attributes["method"].value;

		  storyinliststr += "<tr href='"
		  storyinliststr += href;
		  		
		if(ES[i].attributes["childmenutagname"]){
			storyinliststr += "' childmenutagname='";
		    storyinliststr += ES[i].attributes["childmenutagname"].value;
		}
		  
		  storyinliststr += "' onClick='loadhrefforlist(this)'><td width='20%' id='td0'><img src='";
		  storyinliststr += src;
		  storyinliststr += "'/>";
		  storyinliststr += ES[i].outerHTML;
		  storyinliststr += "<td id='td0'>";
		  storyinliststr +=text
		  storyinliststr +="</td>";
		  storyinliststr += "<td width='15%' id='td0'> >>> </td></tr>";
		}

	}

}
	

function showinlist(){

	var t = document.getElementById("abc");
	document.getElementById("abc").innerHTML = storyinliststr;

}	
function loadhrefforlist(cur){
openLayer('test','test_con');
//alert(storyinliststr);
//alert(cur.getElementsByTagName("row")[0].attributes["loginway"].value);
//setVariable("loginway","0");
//if(cur.attributes["loginway"]){
			setVariable("loginway",cur.getElementsByTagName("row")[0].attributes["loginway"].value);
//}
}

	
	storyinimage();
	storyinlist();
	storyinimgesdingzhi();
	


function grid_list_switchshow(){

    v = "缩略图";
	if(currentmenuelement.attributes["showway"].value =='list'){
	   showinimage();
	   currentmenuelement.attributes["showway"].value='grid';
	   
	}else{
	   showinlist();
	   currentmenuelement.attributes["showway"].value='list';
	   v = "列表"
	}
	setVariable(menustree,form.innerHTML);
	return v;
}

function setrightBarButtonItem(){
     v = "列表";
	if(currentmenuelement.attributes["showway"].value =='grid'){
	   v = "缩略图"
	}
	return v;
   
}

if(currentmenuelement.attributes["showway"].value=='list'){
       showinlist();
}else{
	   showinimage();
}


function viewwillappear(v){ 

	mainmenulist = getVariable(menustree);
	form = document.createElement("form");	
	form.innerHTML = mainmenulist;
	currentmenuelement = form.getElementsByTagName(menutagname)[0];
	ES = currentmenuelement.getElementsByTagName("row");
	//alert(variable);
}
</script>	

<script>
function goMenu(){

//accounts list

	xmlhttp = new XMLHttpRequest();
	xmlhttp.open("GET","accounts.xml",false);
	xmlhttp.send();
	//alert(xmlhttp.responseText);
	
	setVariable("accouts",xmlhttp.responseText);


  


//	strEncoding = "A=2&b=3";
//	closeLayer();
//	setVariable("menutagnamecursor","shoujiyinhang");
//    var form = document.createElement("form");	
//    form.setAttribute("method", "get");
//    form.setAttribute("action","login_2.htm");
//    document.body.appendChild(form); 
//    form.submit();
	

	closeLayer();
    var form = document.createElement("form");	
    form.setAttribute("method", "get");
    form.setAttribute("action","login_2.htm");
    document.body.appendChild(form); 
    form.submit();
	
	
	
	







//	xmlhttp = new XMLHttpRequest();
//	xmlhttp.open("GET","http://www.hui99.com:9342/c/client/serverTime.do?tradeId=getServerTime",false);
//	xmlhttp.send();
//	alert(xmlhttp.responseText);
//  form = document.createElement("form");	
//  form.innerHTML = xmlhttp.responseText;
//  alert(form.getElementsByTagName("svrTime")[0].innerHTML);


	

}
</script>


<!-- 弹出page begin-->
<abc id="test" value="popabc" type="button" onclick="openLayer('test','test_con')" />
<div id="popupDiv" style="display:none">
<div id="tab" style="padding:8px;">
<div id="tabcontent">
<table id='bankingoutlets'>
<tr  class='net1'>
<td align='right'>用户名：
</td>
<td><input id= 'gjz'name='key' type="input"></input>
</td>
</tr>
<tr  class='net1'>
<td align='right'>密码：
</td>
<td><input id= 'gjz'name='key' type="input"></input>
</td>
</tr>
<tr  class="net1">
<td align='right'><button type="button" onclick = "goMenu()" >登录</button>
</td>
<td><button type="button" onclick="closeLayer()" id="communicationcancel">取消</button>
</td>
</tr>
</table>
</div>
</div>
</div>
<!-- 弹出page end-->



